package ru.poomsae.isap.Offline.Hapkido

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import ru.poomsae.isap.R

class HapkiPresFreestyleOffline : AppCompatActivity() {

    var cre = 0
    var har = 0
    var ene = 0
    var mus = 0

    var accy = 0.0
    var pres = 0.0

    var prInt = 0


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.presentation_freestyle_hapkido)

        accy = intent.getDoubleExtra("accuracyDoubleFree", 0.0)
//        accyrFree.setText(accy.toString())
//
//        val decorView = window.decorView
//        val uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN
//
//        creat.setOnCheckedChangeListener(
//            RadioGroup.OnCheckedChangeListener { group, checkedId ->
//                val radio: RadioButton = findViewById(checkedId)
//                cre = ((radio.text as String).toDouble() * (10).toDouble()).toInt()
//                pres = (cre + har + ene + mus).toDouble()/(10).toDouble()
//                creatFree.setText(radio.text as String)
//                presFree.setText(String.format("%.1f",pres))
//                totalFree.setText(String.format("%.1f",pres+accy))
//            })
//
//        harmony.setOnCheckedChangeListener(
//            RadioGroup.OnCheckedChangeListener { group, checkedId ->
//                val radio: RadioButton = findViewById(checkedId)
//                har = ((radio.text as String).toDouble() * (10).toDouble()).toInt()
//                pres = (cre + har + ene + mus).toDouble()/(10).toDouble()
//                harmonFree.setText(radio.text as String)
//                presFree.setText(String.format("%.1f",pres))
//                totalFree.setText(String.format("%.1f",pres+accy))
//            })
//
//        ener.setOnCheckedChangeListener(
//            RadioGroup.OnCheckedChangeListener { group, checkedId ->
//                val radio: RadioButton = findViewById(checkedId)
//                ene = ((radio.text as String).toDouble() * (10).toDouble()).toInt()
//                pres = (cre + har + ene + mus).toDouble()/(10).toDouble()
//                enerFree.setText(radio.text as String)
//                presFree.setText(String.format("%.1f",pres))
//                totalFree.setText(String.format("%.1f",pres+accy))
//            })
//
//        music_cher.setOnCheckedChangeListener(
//            RadioGroup.OnCheckedChangeListener { group, checkedId ->
//                val radio: RadioButton = findViewById(checkedId)
//                mus = ((radio.text as String).toDouble() * (10).toDouble()).toInt()
//                pres = (cre + har + ene + mus).toDouble()/(10).toDouble()
//                mus_cherFree.setText(radio.text as String)
//                presFree.setText(String.format("%.1f",pres))
//                totalFree.setText(String.format("%.1f",pres+accy))
//            })
//
//        sendFree.setOnClickListener {
//                val intent = Intent (this, HapkiPresFreestyleOffline::class.java)
//                startActivity(intent)
//                finish()
//        }

    }
}